Repository navigation
feat: 发布 MCP Server 到 npm(oh-my-sage-mcp),新增 CI 与自动发版 - #37
Merged
Merged
Conversation
- scripts/build-npm-package.mjs 组装只含 MCP 的独立包:5 个运行时依赖,附带本机常驻安装脚本 - scripts/smoke-npm-package.mjs 安装打包产物后实际运行:stdio 握手 32 个工具、HTTP healthz 与 initialize - MCP Server 版本号读取 package.json,新增 --version 与 --help - CI:lint、两套类型检查、单元测试,三个系统 × Node 20/22/24 的打包冒烟测试,Docker 构建 - Release:推送 v* 标签后用 npm 可信发布(OIDC)发版并创建 GitHub Release - README 与部署文档改为 npx 安装,Skill 改用 npx skills add 安装
lazyalex616
marked this pull request as ready for review
November 2, 2026 05:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
内容
把 MCP Server 发布到 npm,包名
oh-my-sage-mcp,用户不用再克隆仓库,MCP 配置里写npx -y oh-my-sage-mcp就能用。同时加上 CI 和自动发版。npm 包
package.json是网页版,标为private,不会被误发布scripts/build-npm-package.mjs在dist/npm/组装一个只含 MCP 的独立包:@modelcontextprotocol/sdk、bn.js、elliptic、ws、zod),和 Docker 镜像共用同一份扫描脚本node_modules约 15 MBpackage.json(之前写死1.0.0),新增--version、--help0.0.2升到0.1.0@hono/node-server,它要求 Node 20工作流
CI(
ci.yml,每个 PR 和 main 推送)/healthz和 initialize 要通过。不连接网关Release(
release.yml,推送v*标签):跑完检查和打包冒烟测试后发布到 npm,并创建 GitHub Release。标签必须和package.json版本一致;该版本已在 npm 上时跳过发布。发布用 npm 的可信发布(OIDC),仓库里不保存任何 npm 令牌,发布的包会自动带上来源证明。首个版本先手动发布,再在 npm 包设置里登记本仓库的
release.yml,之后发版只需要改版本号、合并、推标签。文档
npx skills add allocnode/oh-my-sage --skill mijia-automation安装deploy/README.md、AGENTS.md同步本地验证
--version、stdio 32 个工具、HTTP healthz 与 initialize 全部通过